/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.ec.membermsg.entity.MemberMsg
   Module Description   :

   Date Created      : 2010/12/29
   Original Author   : cut7man
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.ec.membermsg.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * @author cut7man
 * 
 */
@Entity
@Table(name = "EC_MSG_MEMBERMSG")
public class MemberMsg extends BaseEntity {
	public enum STATUS {
		WAIT_FOR_SEND("0"), SENDING("1"), SUCCESS("2"), DELETED("3"), FAILED("4");
		String value;

		STATUS(String status) {
			this.value = status;
		}

		public String getValue() {
			return this.value;
		}
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_msg_membermsg")
	@SequenceGenerator(name = "seq_ec_msg_membermsg", sequenceName = "seq_ec_msg_membermsg")
	@Column(name = "MSG_ID")
	private Long id;
	@Column(name = "SEND_TYPE", length = 1)
	private String sendType;
	@Column(name = "TEMP_ID")
	private Long tempId;
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "SEND_TIME")
	private Date sendTime;
	@Column(name = "TOTAL_DATA")
	private String totalData;
	@Column(name = "UNSUCCESS")
	private String unsuccess;
	@Column(name = "SUCCESS")
	private String success;
	@Column(name = "STATUS")
	private String status;
	@Column(name = "BONUS")
	private BigDecimal bonus = BigDecimal.ZERO;
	@Column(name = "COUPON")
	private BigDecimal coupon = BigDecimal.ZERO;
	@Column(name = "CONTENT")
	private String content;
	@Column(name = "MARKED_DELETE", length = 1)
	private String delete;
	@Column(name = "SEND_TO")
	private String sendTo;

	/**
	 * @return the success
	 */
	public String getSuccess() {
		return success;
	}

	/**
	 * @param success the success to set
	 */
	public void setSuccess(String success) {
		this.success = success;
	}

	/**
	 * @return the delete
	 */
	public String getDelete() {
		return delete;
	}

	/**
	 * @param delete the delete to set
	 */
	public void setDelete(String delete) {
		this.delete = delete;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the sendType
	 */
	public String getSendType() {
		return sendType;
	}

	/**
	 * @param sendType the sendType to set
	 */
	public void setSendType(String sendType) {
		this.sendType = sendType;
	}

	/**
	 * @return the tempId
	 */
	public Long getTempId() {
		return tempId;
	}

	/**
	 * @param tempId the tempId to set
	 */
	public void setTempId(Long tempId) {
		this.tempId = tempId;
	}

	/**
	 * @return the sendTime
	 */
	public Date getSendTime() {
		return sendTime;
	}

	/**
	 * @param sendTime the sendTime to set
	 */
	public void setSendTime(Date sendTime) {
		this.sendTime = sendTime;
	}

	/**
	 * @return the totalData
	 */
	public String getTotalData() {
		return totalData;
	}

	/**
	 * @param totalData the totalData to set
	 */
	public void setTotalData(String totalData) {
		this.totalData = totalData;
	}

	/**
	 * @return the unsuccess
	 */
	public String getUnsuccess() {
		return unsuccess;
	}

	/**
	 * @param unsuccess the unsuccess to set
	 */
	public void setUnsuccess(String unsuccess) {
		this.unsuccess = unsuccess;
	}

	/**
	 * @return the status
	 */
	public String getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * @return the bonus
	 */
	public BigDecimal getBonus() {
		return bonus;
	}

	/**
	 * @param bonus the bonus to set
	 */
	public void setBonus(BigDecimal bonus) {
		this.bonus = bonus;
	}

	/**
	 * @return the coupon
	 */
	public BigDecimal getCoupon() {
		return coupon;
	}

	/**
	 * @param coupon the coupon to set
	 */
	public void setCoupon(BigDecimal coupon) {
		this.coupon = coupon;
	}

	/**
	 * @return the content
	 */
	public String getContent() {
		return content;
	}

	/**
	 * @param content the content to set
	 */
	public void setContent(String content) {
		this.content = content;
	}

	public String getSendTo() {
		return sendTo;
	}

	public void setSendTo(String sendTo) {
		this.sendTo = sendTo;
	}

}
